package com.design;

/**
 * 销售行
 */
public class SaleReport implements ReportRow {
    /**
     * 产品名称
     */
    private String productName;
    /**
     * 数量
     */
    private int quantity;
    /**
     * 单价
     */
    private double price;

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public int getQuantity() {
        return quantity;
    }

    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }
    /**
     * 构造方法
     */
    public SaleReport(String productName, double price, int quantity) {
        this.productName = productName;
        this.price = price;
        this.quantity = quantity;
    }

    @Override
    public void accept(ReportVisitor visitor) {
        visitor.visitSaleReport(this);
    }
}
